package com.love.cloud.admin.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.love.cloud.common.mybatis.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author hongdongqu
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="通知消息", description="")
@Entity
@TableName("notice_message")
@Table(name="notice_message")
@org.hibernate.annotations.Table(appliesTo = "notice_message",comment="通知消息")
public class NoticeMessage extends BaseEntity {

    @ApiModelProperty(value = "消息内容")
    @Column(columnDefinition = "varchar(1000) COMMENT '指令标题'")
    private String content;

    /**
     * @Fields relationId :关联表id
     */
    @ApiModelProperty(value = "关联表id")
    @Column(columnDefinition = "bigint(20) COMMENT '关联表id'")
    private Long relationId;
    /**
     * @Fields relationType :关联类型
     */
    @ApiModelProperty(value = "关联类型")
    @Column(columnDefinition = "varchar(80) COMMENT '关联类型'")
    private String relationType;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @Column(columnDefinition = "varchar(20) COMMENT '手机号'")
    private String mobile;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @Column(columnDefinition = "bigint COMMENT '用户id'")
    private Long userId;

    @ApiModelProperty(value = "是否已读")
    @Column(columnDefinition = "tinyint(1) COMMENT '是否已读，默认为否' default 0")
    private Boolean isRead;
}
